

/*********************************************************************************************
 Project:  Do Voters and Non-Voters Differ in Their Policy Preferences?
 Date:     October 2025
 Purpose:  Replication 
 Author:   Prepared by Semih Çakır
**********************************************************************************************/

/*

This part is optional. Customize your Stata as you wish depending on the esthetics you want
grstyle clear

grstyle init
grstyle set plain, box
grstyle color background white
grstyle set color gs10%50
grstyle yesno draw_major_hgrid yes
grstyle yesno draw_major_ygrid yes
set scheme s1mono

	clear all
	set more off
	numlabel, add
	
*/	


	
/*******************************************************************************
	 Select sections to run (1 to run, 0 otherwise) 
*******************************************************************************/

* You need to select among the following depending on what you want to replicate. But first, run prep1 and prep2 to get the data (data1.dta and panel.dta). Then, for instance, if you only want to replicate Figure 2, you need to select figure2 by putting a "1" next to it. For whatever you do not want to replicate, put a "0", the code will skip those. 
 

	* Preparation 
	
	local paths				1 

	* Data coding and construction
	local prep1	 			0 // prepares the data (EES)
	local prep2	 			0 // prepares the data (BESIP)
	
	* Replicating the main analyses
	
	local figure1			0 // FIGURE 1: Reported and actual voter turnout across European democracies
	local table1 			0 // TABLE 1 - Do the policy peferences of voters and non-voters differ? 
	local figure2			0 // FIGURE 2: Distribution of pvalues from Survey-Level Models

	
	local figure3			0 // Figure 3: Effect sizes based on Cohen's d 
	
	local figure4			0 // Figure 4: How much would the average electorate position change if non-voters had voted?
	
	
	local figure5			0 // Figure 5: Bias is larger when turnout is lower
	local figure6			0 // Figure 6: Preferences of perpetual non-voters (PNV), peripheral voters (PV) and regular voters (RV)

	
	*APPENDICES 
	local appendixB			0 // Replicate Appendix B: Election salience and reported Turnout
	local appendixC			0 // Replicate Appendix C: Policy items and distributions
	local appendixD			0 // Replicate Appendix D: Models with control variables
	local appendixE 		0 // Replicate Appendix E: Survey-level variations: Do voters differ from non-voters across surveys?
	local appendixF			0 // Replicate Appendix F: Visual example of distribution of preferences based on Cohen's d
	local appendixG			0 // Replicate Appendix G: Descriptives for voters, non-voters and citizens across countries
	local appendixI			0 // Replicate Appendix I: Does the act of voting influence policy views?
	local appendixJ			0 // Replicate Appendix J: Why biases are larger under low turnout: Perpetual non-voters, peripheral voters, regular voters
	local appendixK			0 // Replicate Appendix K: Non-voters are more likely to pick "don't know" or the mid-scale 
	local appendixL			0 // Replicate Appendix L: What explains the differences between voters and non-voters?
	local appendixM			0 // Replicate Appendix M: Do results based on reported turnout differ from those based on validated turnout: The British case
	local appendixN			0 // Replicate Appendix N: Replication of analyses with latent predispositions

	

	if `paths' {
		
	*Set your directory (Do not forget to adjust the location of these folders):

	global directory "~/Dropbox/EJPR/turnout_test" 

	/*		IMPORTANT!
	
		 Now we create the following folders inside the folder that you just selected as global directory. Things will be saved in these subfolders: 
			 - create a subfolder called "data": Put the datasets here. In our case, it is EES2019.dta, EES2014.dta., yearselectionsandees.dta, BES2019_W23_Panel_v23.0.dta, bes_f2f_2015_v4.0.dta, cses_imd_original.dta and 1999-2019_CHES_dataset_means(v3).dta. When you run "prep1", the dataset for EES analyses will also be saved here automatically. When you run "prep2", the BESIP dataset will be ready. You need cses_imd_original.dta (CSES IMD) for Appendix B. You need to use bes_f2f_2015_v4.0.dta for Appendix M. You need 1999-2019_CHES_dataset_means(v3).dta for Appendix L
			
			 - create a subfolder called "dofiles": all the dofiles are located here
			 - create a subfolder called "tables": this is where the regression results or descriptive stats will be saved
			 - create a subfolder called "figures": all the figures will be saved here (otherwise it would get messy)
		
					 - create more subfolders under data folder:
					 - a new subfolder: "pvalues"
					 - a new subfolder: "cohend"
					 - a new subfolder: "consequences"
					 - a new subfolder: "votertype"
					 - a new subfolder: "correlation"
					 - a new subfolder: "distribution"
					 - a new subfolder: "coefplots"
					 - a new subfolder: "government_ideology"
					 - a new subfolder: "BES2015"
					 - a new subfolder: "factors"
					
	*/
	
					
	global data "${directory}/data" 
	global dofiles "${directory}/dofiles" // Put all the dofiles here.
	global tables "${directory}/tables"  
	global figures "${directory}/figures" 
	
	}	
		
/*******************************************************************************
	 PREP 1 - Code the data 
*******************************************************************************/

	if `prep1'{
		cd "${dofiles}" 
		do prep1.do 
	}

/*******************************************************************************
	 PREP 2 - Code the data for PANEL analyses
*******************************************************************************/

	if `prep2'{
		cd "${dofiles}" 
		do prep2.do 
	}

	
/*******************************************************************************
	 FIGURE 1: Reported and Actual Voter Turnout across European Democracies
*******************************************************************************/

	if `figure1'{
		cd "${dofiles}" 
		do figure1.do 
	}

	
/*******************************************************************************
	 TABLE 1: Do the Policy pPeferences of Voters and Non-Voters differ?
*******************************************************************************/

	if `table1'{
		cd "${dofiles}" 
		do table1.do 
	}
	

/*******************************************************************************
	 FIGURE 2: Distribution of Pvalues from Survey-Level Models
*******************************************************************************/

* NOTE: Don't forget to create a subfolder "pvalues" in "data" folder: 
	if `figure2'{
		cd "${dofiles}" 
		do figure2.do 
	}
	
	
	

	
/*******************************************************************************
	 FIGURE 3: Effect sizes based on Cohen's d 
*******************************************************************************/

* NOTE: Don't forget to create a subfolder "cohend" in "data" folder: 


	if `figure3'{
		cd "${dofiles}" 
		do figure3.do 
	}

		
	
/*******************************************************************************
	 FIGURE 4: How much would the average electorate position change if non-voters had voted?
*******************************************************************************/

* NOTE: Don't forget to create a subfolder "consequences" in "data" folder: 


	if `figure4'{
		cd "${dofiles}" 
		do figure4.do 
	}
	
/*******************************************************************************
	 FIGURE 5: Bias is larger when turnout is lower
*******************************************************************************/

* NOTE: Don't forget to create a subfolder "consequences" in "data" folder: 


	if `figure5'{
		cd "${dofiles}" 
		do figure5.do 
	}


/*******************************************************************************
	 FIGURE 6: Preferences of perpetual non-voters (PNV), peripheral voters (PV) and regular voters (RV)
*******************************************************************************/

* NOTE: Don't forget to create a subfolder "consequences" in "data" folder: 


	if `figure6'{
		cd "${dofiles}" 
		do figure6.do 
	}


	
	
/*******************************************************************************
	 APPENDIX B: Election salience and reported Turnout
*******************************************************************************/

	if `appendixB'{
		cd "${dofiles}" 
		do appendixB.do 
	}

/*******************************************************************************
	 APPENDIX C: Policy items and distributions
*******************************************************************************/

* NOTE: Don't forget to create a subfolder "distribution" in "data" folder: 


	if `appendixC'{
		cd "${dofiles}" 
		do appendixC.do 
	}

	
/*******************************************************************************
	 APPENDIX D: Models with control variables
*******************************************************************************/


	if `appendixD'{
		cd "${dofiles}" 
		do appendixD.do 
	}

/*******************************************************************************
	 APPENDIX E: Survey-level variations: Do voters differ from non-voters across surveys?
*******************************************************************************/

* NOTE: Don't forget to create a subfolder "COEFPLOTS" in "data" folder: 


	if `appendixE'{
		cd "${dofiles}" 
		do appendixE.do 
	}

/*******************************************************************************
	 APPENDIX F: Visual example of distribution of preferences based on Cohen's d
*******************************************************************************/

* NOTE: Don't forget to create a subfolder "cohend" in "data" folder: 


	if `appendixF'{
		cd "${dofiles}" 
		do appendixF.do 
	}
	
	
/*******************************************************************************
	 APPENDIX G: Descriptives for voters, non-voters and citizens across countries
*******************************************************************************/

	if `appendixG'{
		cd "${dofiles}" 
		do appendixG.do 
	}
		
/*******************************************************************************
	 APPENDIX I: Does the act of voting influence policy views?
*******************************************************************************/

	if `appendixI'{
		cd "${dofiles}" 
		do appendixI.do 
	}
		
/*******************************************************************************
	 APPENDIX J: Why biases are larger under low turnout: Perpetual non-voters, peripheral voters, regular voters
*******************************************************************************/

	if `appendixJ'{
		cd "${dofiles}" 
		do appendixJ.do 
	}

/*******************************************************************************
	 APPENDIX K: Non-voters are more likely to pick "don't know" or the mid-scale 
*******************************************************************************/

* NOTE: Don't forget to create a subfolder "votertype" in "data" folder: 


	if `appendixK'{
		cd "${dofiles}" 
		do appendixK.do 
	}

/*******************************************************************************
	 APPENDIX L: What explains the differences between voters and non-voters?
*******************************************************************************/

* NOTE: Don't forget to create a subfolder "government_ideology" in "data" folder: 

	if `appendixL'{
		cd "${dofiles}" 
		do appendixL.do 
	}
	
	
/*******************************************************************************
	 APPENDIX M: Do results based on reported turnout differ from those based on validated turnout: The British case
*******************************************************************************/

* NOTE: Don't forget to create a subfolder "BES2015" in "data" folder: 


	if `appendixM'{
		cd "${dofiles}" 
		do appendixM.do 
	}

/*******************************************************************************
	 APPENDIX N: Replication of analyses with latent predispositions
*******************************************************************************/

* NOTE: Don't forget to create a subfolder "factors" in "data" folder: 


	if `appendixN'{
		cd "${dofiles}" 
		do appendixN.do 
	}


		
			
		
				
						
		
		